import React, { Component } from 'react'
import { Switch, Route } from 'react-router-dom'
import MyNavLink from './components/MyNavLink'
import Header from './components/Header'
import Abourt from './pages/Abourt'
import Home from './pages/Home'


export default class App extends Component {




	render() {
		return (
			<div >

				<Header />
				<div className="row">
					<div className="col-xs-2 col-xs-offset-2">
						<div className="list-group">

							<MyNavLink to="/mhz/about">About</MyNavLink>
							<MyNavLink to="/mhz/home">Home</MyNavLink>
						</div>
					</div>
					<div className="col-xs-6">
						<div className="panel">
							<div className="panel-body">
							
									{/* 注册路由
									<Route path="/about" component={Abourt} />
									<Route path="/home" component={Home} />
									<Route path="/home" component={Test} /> */}
									{/*  这个路径 home 会进行多次匹配, 进行显示 
										添加Switch的作用就是只进行匹配一次 
									
									*/}
								<Switch>
									{/* 注册路由 */}
									<Route path="/mhz/about" component={Abourt} />
									<Route path="/mhz/home" component={Home} />
									
								</Switch>
							</div>
						</div>
					</div>
				</div>



			</div>
		)
	}
}
